Decoder for barcodes with anti-copy feature

ABSTRACT

A method for detecting reproduction of barcodes ( 12 ) includes providing a barcode which contains data; providing a copy-evident background ( 14 ); capturing an image of the barcode and the copy-evident background; locating and decoding the barcode; detecting copy introduced changes in the copy-evident background; and authenticating the barcode if the copy-evident background has not been copied.

CROSS REFERENCE TO RELATED APPLICATIONS

Reference is made to commonly-assigned copending U.S. patent applicationSer. No. 13/690,180 (now U.S. Publication No. 20140151445), filed Nov.30, 2012 herewith, entitled SYSTEM FOR DETECTING REPRODUCTION OFBARCODES, by Pawlik et al.; the disclosure of which is incorporatedherein.

FIELD OF THE INVENTION

This invention relates in general to authentication of objects and moreparticularly relates to prevention of authentication of objects whichhave been copied.

BACKGROUND OF THE INVENTION

A problem which has been encountered in the industry is returningobjects to obtain refunds. Even if the legitimate objects have barcodesor other means for authenticating the object, counterfeiters often makephotocopies of legitimate labels in order to obtain refunds or to returnobjects.

SUMMARY OF THE INVENTION

Briefly, according to one aspect of the present invention a barcodecontaining data is printed on or near a copy-evident background. Thebarcode is read to extract the data by capturing an image of the barcodewith an imaging device such as a mobile phone camera. The barcode islocated and decoded using the registration locators in the barcode imageto locate and detect copy-evident features of specific regions of thecopy-evident background. Upon successful detection of the copy-evidentfeatures, the barcode is authenticated as an original barcode. In aspecific embodiment of this invention, the barcode itself is printedwith a fill comprised of a copy-evident color or pattern.

The invention and its objects and advantages will become more apparentin the detailed description of the preferred embodiment presented below.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a schematic of a device used to scan an image containing abarcode.

FIG. 2 shows an example of a barcode printed with a copy-evidentfeature.

FIG. 3 shows the barcode of FIG. 2 after copying on a black and whitephotocopier.

FIG. 4 shows a graph comparing original and photocopied barcodes.

FIG. 5 shows a flowchart illustrating the coding and authenticationprocess.

FIG. 6 shows normal encoding.

FIG. 7 shows encoding as separate strings.

DETAILED DESCRIPTION OF THE INVENTION

The present invention will be directed in particular to elements formingpart of, or in cooperation more directly with the apparatus inaccordance with the present invention. It is to be understood thatelements not specifically shown or described may take various forms wellknown to those skilled in the art.

Barcodes on packaging and publications are widely used by manufacturersand publishers to associate identity data with an item. The term barcodecovers a variety of code types including quick response codes (QRcodes).

Barcode scanners can be used to decode and read this data in the supplychain and marketplace. In many cases, item barcodes are unique for eachitem and, when used with a track and trace database, provide themanufacturer, publisher, or authorities a means of tracing the origin ofa product and tracking its progress through the distribution system.Item level serialization allows manufacturers and publishers to usebarcodes, particularly barcodes to support product recalls, and tocombat counterfeiting and diversion by checking on the authenticity ande-pedigree of the product, publication or document. When used in thismanner, it is particularly important to verify that the barcode beingread is an authentic barcode on an authentic item, and that it has notbeen copied and reprinted on a counterfeit item, or on an authentic itemthat has been diverted outside of the authorized supply chain.

Today, most mobile phones are equipped with cameras and mobileapplications which allow the user to easily scan barcodes anytime andanywhere, with a device they carry with them in their pocket.Manufacturers and publishers use barcodes, for example the “QuickResponse” or QR barcode to provide consumers, retailers, andinvestigators a convenient method to obtain information with additionalproduct data and to easily link to product-related websites. Mobilephones equipped with cameras can also be used to decode data or web sitelinks which can be used to verify the authenticity and e-pedigree of theproduct, publication or document.

As economic and safety-related threats from counterfeit and divertedproduct become more prevalent, there is an increasing need for a productauthentication methods anyone can use. One such approach uses mobilephones equipped with cameras and software to decode barcodes and toverify the authenticity and e-pedigree of the item containing thebarcode based on the decoded data (including data on associatedwebsites). In order for this approach to be effective, it is necessaryto ensure that the barcode being read is an authentic barcode on anauthentic item, and that it has not been copied and reprinted on acounterfeit item, or on an authentic item that has been diverted outsideof the authorized supply chain.

The present invention provides a method of ensuring that a printedbarcode, when imaged by an imaging device such as a mobile phone cameraand subsequently decoded, is the original barcode and not a copy. Inthis invention, a barcode containing data is printed on or near acopy-evident background, the barcode is read to extract the data bycapturing an image of the barcode with an imaging device such as amobile phone camera, locating and decoding the barcode, using theregistration locators in the barcode image to locate and detectcopy-evident features of specific regions of the copy-evidentbackground, and, upon successful detection of the copy-evident features,authenticating the barcode as an original barcode and not a copy. In aspecific embodiment of this invention, the barcode itself is printedwith a fill comprised of a copy-evident color or pattern.

The copy-evident background or fill could be made up of a voidpantographs pattern. Void pantographs are commonly used as backgroundson financial documents such as checks. The void pantograph patterns aredesigned to exploit the limitations in resolution of copiers andscanners. In one common void pantograph pattern calledbig-dot-little-dot, the small dots are below the resolution threshold ofthe copier and become lighter when copied. This increases the contractbetween the small dots and the large dots and the “void” message in theoriginal document becomes obvious in the copy. A variety of other voidpantograph approaches exist and are continually being improved as copierand scanner technology advances are made.

Color can also be used as a copy-evident feature. In the simplestembodiment of this approach, any color that is present in the backgroundor barcode, is copy-evident, if it is copied with a black and whitecopier. More complicated approaches to using color as a copy-evidenttool include the use of special inks that change color with specialstimuli, such as thermochromic ink (heat), or uv-fluorescent inks (UVlight). These stimuli affect the color of the copy-evident feature andmust be applied when an image of the copy-evident feature is captured.This is difficult if the image is captured with a scanner or copier, butcan be done if the image is captured with a mobile phone camera.

Referring now to FIG. 1 which shows a schematic of a device used to scanan item 10 that contains a barcode 12 and copy-evident features 14. Animage of this item is captured by an image sensor 20 and imaging optics22 of a digital camera 16. The image data is processed by amicroprocessor 24 using an algorithm stored in memory 26. The processingstep can include decoding of the barcode 12 and evaluation of thecopy-evident features 14. The microprocessor also controls a display 30where a preview image and information about the decoded data can bedisplayed. The camera also contains a wireless interface 28 that allowsthe microprocessor to communicate with a web-based data-processingserver 40 via a wireless data link 32.

FIG. 2 shows an example of a barcode printed near copy-evident features.The barcode 100 is of the type “Quick Response” (QR) and is surroundedby a copy-evident background 14 consisting of four patches exhibitingtwo distinct image patterns. Areas 110 are coarse dot patterns, areas112 exhibit a uniform grey value. The average brightness of the twopatterns is approximately equal. The camera 16, shown in FIG. 1,determines the average brightness of the patches by capturing an imageand using the microprocessor 24 to calculate the average pixel value inan area that encompasses a substantial fraction of each patch. Ofparticular importance for this invention is the difference in averagebrightness of the two distinct patterns.

It is be beneficial to locate the patches at a predetermined distancewith respect to the finder patterns 102 of the barcode shown in FIG. 2.The locations of the finder patterns, which are provided by a barcodedecoding algorithm, are used as a guide to locate the four patches.Finder patterns are a feature of all barcode types and allow thedecoding algorithm to find the barcode in an image and to determine itsdimensions patterns are the features labeled 102. In a Datamatrixbarcode, the finder pattern is a rectangle formed by two orthogonalsolid lines and two alternating light and dark lines opposite the solidlines.

FIG. 3 shows the barcode incorporating anti-copy features after copyingon a black and white copier. Such devices are often engineered tomaximize image contrast of the copy by using a thresholding techniquethat that creates a binary (black and white) image. This imagemanipulation reproduces halftone images well, but does not accuratelyreproduce true grayscale images. As can be seen by comparing FIGS. 2 and3, the copy process affects the two patterns 110 and 112 differently.While the large dot patterns 110 are reproduced accurately, the uniformgrey areas 112 are below the threshold and reproduced as white.Therefore, an evaluation of the average brightness of the two patternsof the copy will yield a large difference in brightness. Consequently,the evaluation of the brightness difference can be used to distinguishthe original from the copy by comparing it to expected brightnessranges. Although brightness is used in this example, other imageattributes such as image noise and color may be used as long as they canbe calculated from the pixel data of a digital image of the copy-evidentfeatures and as long as they are substantially different for theoriginal and the copy.

FIG. 2 may be printed in multiple colors and the copy distinguished fromthe original by verifying the presence of the original color values atspecified distances from the finder patterns within the barcode.

FIG. 4 shows data produced by evaluating the average pixel value ofareas 110 and 112 using digital images of the original and the copiedbarcode incorporating anti-copy features. In this example, the meanpixel value of the two areas 110 as shown in FIGS. 2 and 3 isapproximately equal for the original and the copy whereas it isdifferent for the two areas 112. One can define a parameter DIFF=meanpixel value of areas 112−mean pixel value of areas 110. This parameteris 3.8 for the original and 29.6 for the copy. Therefore, a thresholdcan be defined that separates the original and copy. For any subsequentimage of the barcode incorporating anti-copy features the parameter canbe calculated and, if it is above the threshold, the barcode isrejected.

An additional embodiment for separating the copied barcode from theoriginal is to analyze the color of the barcode itself or of patches atspecified distances from the finder patterns within the barcode. Forexample, if the barcode it is printed using a non-black ink, a black andwhite copy will not reproduce the color accurately. For color copies,the barcode can be printed with certain inks that are not wellreproduced by the yellow, magenta, and cyan color components of a colorcopier. One examples of such inks is neon pink.

Furthermore, one could print the barcode using an ink that changes colorwhen subjected to illumination with a specialized light source likeultraviolet light. In a simple example, the barcode 12 is printed usingred ink and the location of the finder pattern is used to determine theRGB color coordinates of the pixels in the center of the finder pattern.In this example, the RGB values of the digital image obtained from theoriginal are RGB (117, 29, 60) whereas the copy has RGB values of (38,40, 46). In order to identify a barcode as original we would look for asubstantially larger R value in the RGB color coordinate which isclearly evident in the relevant data of the image of the originalwhereas the RGB values of the analogous data of the image of the copyare similar, indicating a grey pixel color.

FIG. 5 shows a flow chart that illustrates the process for decoding andauthenticating a barcode using the anti-copy feature in this invention.

The preceding example offered means to distinguish original barcodesfrom barcodes copied by direct reproduction. A second method of creatinga counterfeit barcode that holds identical data to the original barcodeis to scan the code and recreate a new barcode that encodes the samedata. This recreation can, for example, be achieved by scanning the codeusing a smart phone or barcode reader, opening a barcode creationsoftware on a PC, copying the code information from the smart phone tothe PC and creating a barcode with the same information.

While this copy process will create a code that holds the sameinformation as the original code, there are ways to distinguish theoriginal from the recreated barcode that revolve around restricting theacceptable formatting of the barcode. In the case of a QR code there arethree parameter that are used in the code generation process. They areError Correction Level (S, M, Q, H), Code Size (Also called Version,Dimension) of the code, and Code Mask (1-8). The Error Correction Leveldetermines the percentage of the code space that is used for errorcorrection. The Code Size limits the total amount of data that can beencoded. The Code Mask is a regular binary pattern of 1 and 0 of thesame dimension as the code matrix. It is convoluted with the codepattern excluding the finder patterns and code format bits such that thecode cells are reversed (e.g. black replaced by white) when the codemask at this location is 1, and cells are not reversed when the codemask at this code location is 1.

Selection of the proper mask serves to maximize decodability. Of thesethree parameters, the first two can usually be selected manually, butthe third is set automatically with all current QR code generating PC orweb-based software. If one, therefore, uses a QR code generatingalgorithm that predetermines the mask parameter and combines it with aproprietary QR code decoder that only decodes those QR codes that matchthe predetermined mask parameter, the chance for a counterfeiter togenerate a valid QR code is reduced by a factor of eight. Otherparameters that could be used to attain a non-default method of encodingare non-standard methods of error correction (e.g. ECC080 instead of thedefault ECC200).

In addition to this countermeasure, one can exploit the feature of QRcodes that allows concatenation of messages of varying length. Forexample, the number “16529426” would normally be encoded as a singlestring of numerals 120 of the length 8. However, it is also possible toencode this number as separate strings of numerals 122 of varying lengthfor example “1” followed by “6” followed by “529426.” As shown in FIGS.6 and 7, these two methods of encoding lead to completely different QRcode patterns and although the QR code decoding algorithm willultimately deliver the same result, the raw data of the decoded QR codeis different. One can therefore, program a proprietary QR code decodingalgorithm such that it will only accept QR codes when the raw data showsthat the code is broken into sub-strings of numerals of a predeterminedlength that matches a set of predetermined expectations. A normal QRcode encoder that a counterfeiter would use to recreate a scanned QRcode will encode the message as a single string of numerals 120.Therefore the proprietary QR code decoder will be able to distinguishthe recreated QR code from the original QR code even if the otherparameters (Error Correction Level, Code Size and Code Mask) are thesame in the original and recreated code.

Within a single error correction methodology, the above methods ofencoding the QR code in a non-standard way do not affect the degree oferror correction. Therefore, the code retains its readability withbarcode scanners. An alternative method of deliberately inserting falsecells into the code and teaching the proprietary QR code decoder to lookfor these engineered defects would also reduce the allowed amount ofother defects (from e.g. printing) that could be present in the codebefore it becomes unreadable. This is undesirable.

The invention has been described in detail with particular reference tocertain preferred embodiments thereof, but it will be understood thatvariations and modifications can be effected within the scope of theinvention.

PARTS LIST

-   10 item-   12 barcode-   14 copy-evident features-   16 camera (image or capture device)-   20 image sensor-   22 imaging optics-   24 microprocessor-   26 memory-   28 wireless interface-   30 display-   32 wireless data link-   40 web-based data processing-   100 barcode-   102 finder patterns-   110 area (pattern)-   112 area (pattern)-   120 QR code generated using default encoding of the code message as    a single string of numerals-   122 QR code generated using encoding of the code message as three    separate strings of numerals

The invention claimed is:
 1. A method for detecting reproduction ofbarcodes comprising: providing a barcode which contains data; providinga copy-evident background; capturing an image of the barcode and thecopy-evident background; locating and decoding the barcode; using thelocation of the barcode to locate the copy-evident background, detectingcopy introduced changes in the copy-evident background; andauthenticating the barcode if the copy-evident background has not beencopied.
 2. The method of claim 1 wherein the copy-evident background islocated adjacent to the barcode.
 3. The method of claim 1 wherein thecopy-evident background contains one or more color elements.
 4. Themethod of claim 1 further wherein the copy-evident background is a voidpantograph.
 5. The method of claim 1 further wherein the barcode isauthenticated on site by means of a computer or other computationaldevice.
 6. The method of claim 1 further comprising: transmitting thedata obtained from the barcode, an image of the barcode, or both to aremote location for authentication.
 7. The method of claim 6 furthercomprising: transmitting a confirmation of authentication from theremote location to the site of the transmission.
 8. A method fordetecting reproduction of barcodes comprising: providing a barcode whichcontains data and one or more color elements; capturing an image of thebarcode and a copy-evident background; locating and decoding thebarcode; using the location of the barcode to locate the copy-evidentbackground, detecting copy introduced changes in the color of thebarcode; and authenticating the barcode if the barcode has not beencopied.